<script src="assets/js/user_validate.js" type="text/javascript" charset="utf-8"></script>
<h1>Sign Up</h1>
<?php
$country=new country;


printformheader('',$_GET['cmd']);
begin_form($_GET['cmd'],$id);

$o['label']='First Name';
p_input('serial_first_name',$o,$e);

$o['label']='Last Name';
p_input('serial_last_name',$o,$e);



if($conf->key=='signup')
{
	$o['label']='Email';
	p_input('user_email',$o,$e);
	
	
		$o['label']='Password';
		$o['password']=TRUE;
		p_input('user_password',$o,$e);

		$o['label']='Confirm';
		p_input('confirm_password',$o,$e);
		$o['password']=FALSE;
	}


$o['label']='Address Line 1';
p_input('serial_user_address',$o,$e);

$o['label']='Address Line 2';
p_input('serial_user_address_1',$o,$e);

$o['label']='City ';
p_input('serial_user_city',$o,$e);

$o['label']='State';
p_input('serial_user_state',$o,$e);

$o['label']='Postcode';
p_input('serial_user_zip',$o,$e);

$o['label']='Country';
$o['none']=TRUE;
p_select('serial_country',$country->list,$e,'0','1',$o);


$o['label']='Telephone';
p_input('serial_user_mobile',$o,$e);


include 'admin/b/autofilluser.php';


$o['label']='user_name';
p_hidden('user_name',$o,$e);

printsubmit("Signup");
end_form($_GET['cmd']);




printformfooter(NULL,NULL,NULL,NULL,NULL);
?>


<script type="text/javascript" charset="utf-8">
	$("#data_form").validate({
			rules: {
				serial_first_name: "required",
				serial_last_name: "required",
				
					user_password: {
						required: true,
						minlength: 5
					},
					confirm_password: {
						required: true,
						minlength: 5,
						equalTo: "#user_password"
					},
				user_email: {
					required: true,
					email: true,
					  remote:'admin/a/email_exists_check.php'  
				}
			
			},
			messages: {
			
				 user_email: {  
	                    remote:jQuery.format("This Email address has been used")
	                }
			}
		});
</script>